<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<link rel="stylesheet" href="Public/Bootstrap/Css/bootstrap.min.css" />
	<link rel="stylesheet" href="Public/Css/common.css" />
	<script type="text/javascript" src='Public/Js/jquery-1.7.2.min.js'></script>
	<style type="text/css">
		body{
			margin-bottom: 100px;
		}
	</style>
</head>
<body>
	<div class="container-fluid">
	<div class="row-fluid">
	<div class="span12">

	<if condition="$is_show">
	<form action="{{U('edit',array('goods_id'=>$_GET['goods_id']))}}" method='post'>
	</if>
		<table class='table table-bordered table-hover'>
			<tr>
				<th>货品ID</th>

                {{foreach from="$spec['combine']" key="$k" value="$v"}}
					<th>{{$v['typeattr_name']}}</th>
                {{endforeach}}

				<th>库存</th>
				<th>货号</th>
			</tr>
			<!-- 如果已添加数目小于可能情况数目，才出现添加货品的输入框 -->
			<if condition="$is_show">
			<tr class="info">
				<td>修改货品</td>
				{{foreach from="$spec['combine']" key="$k" value="$v"}}
					<td>
						{{$v['goods_value']}}
					</td>
				{{endforeach}}
				<td>
					<input type="text" name='goodslist_total' value="{{$spec['goodslist_total']}}"/>
				</td>
				<td>
					<input type="text" name='goodslist_num' value="{{$spec['goodslist_num']}}" />
				</td>
			</tr>
			</if>
		</table>

	<if condition="$is_show">
		<input type="hidden" name='goodslist_id' value="{{$_GET['goodslist_id']}}"/>
		<input type="submit" value='确认修改' class="btn btn-primary"/>
	</form>
	</if>

	</div>
	</div>
	</div>


</body>
</html>